-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sync): Add a sync and CJS entrypoint for editor tooling #772
Conversation
🦋 Changeset detectedLatest commit: be6c3b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!preview sync |
|
!preview sync |
|
I believe |
!preview sync |
|
!preview sync |
|
!preview sync |
|
Changes
TypeScript unfortunately does not support running async methods inside its LanguageService API, so our language server needs a sync version of the compiler. Since WASM instantiation is async only, you still need at least one async init call, but then you can use all the methods sync. It's not perfect, but it at leasts allows us to not rely on
synckit
, which makes things slowWhy the separate file?
index.ts
has a call toimport.meta.url
, which prevented my CJS-based application to even import the file. Annoying. ESM in VS Code extensions when 😠Testing
Tested manually
Docs
N/A